package com.zjh.service;

import com.zjh.dao.sysUserDao;
import com.zjh.mapper.sysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class sysUserService {
    @Autowired
    sysUserMapper mapper;

    public List<sysUserDao> getAllUsers()
    {
       return mapper.getAllUsers();
    }

    public sysUserDao getuserByid(int id)
    {
        return mapper.getUserByid(id);
    }

    public void deleteUserByid(int id)
    {
        mapper.delectUserByid();
    }
    public void addUser(sysUserDao usr)
    {
        mapper.addUser(usr);
    }

    public sysUserDao getuserByUsername(String username) {
       return mapper.getuserbyUsername(username);

    }
}
